package main.chapter3.objects

class Driver
interface OnExternalDriverMountListener {
    fun onMount(driver: Driver)
    fun onUnMount(driver: Driver)
}

//与class相似，但是只有一个实例，也就是单例
object MusicPlayer : OnExternalDriverMountListener {
    override fun onMount(driver: Driver) {
    }

    override fun onUnMount(driver: Driver) {
    }

    var state = 0
    fun play(url: String) {

    }

    fun stop() {

    }
}